.TH "createdb.postgis" "1" "" "Roberto Boati" "Postgis utilities"
.SH "NAME"
.LP 
createdb.postgis \- Create Postgis database in a PostgreSQL server.
.SH "SYNTAX"
.LP 
createdb.postgis [\fIoptions\fP] \fIdatabase_name\fP
.SH "DESCRIPTION"
.LP 
This program create a database for working with Postgis geometries.
.br 
Using this program any user with createdb permissions can create a spatial enabled database.
.SH "OPTIONS"
.LP 
.TP 
<\fIdatabase_name\fP>
Database to be created.
.TP 
<\fIoptions\fP>
All options from createdb(1), except choice of template database, can be used here.
Specifying an owner here will not be able to set ownership to the tables originating 
from the template database used, unless the template owner, that is calling this 
script, is dba. Otherwise, you could only build databases owned by the 
template owner.
.TP
The most significant option would be \fI\-\-template\fP below.
.TP 
\fB\-\-template=\fR<\fItemplatedb\fP>
Set template name to be <\fItemplatedb\fP>
.TP
Environment variable: \fITEMPLATEDB\fR.
.TP 
.TP 
\fB\-\-help\fR
Output help information and exit.
.SH "ENVIRONMENT"
.TP 
.B TEMPLATEDB
If
.RB $ TEMPLATEDB
is set, its value is used as the default template name.
.SH "FILES"
.LP
The environment variables for template_gis creation, removal and usage may be stored in files, as follows:
.TP
.B /etc/default/postgis
will designate default values for the whole system.
.TP
.B $HOME/.postgis/profile
will designate the values used by the current user by default.
Beware, this is the current SYSTEM user, not the dba or the database owner to 
become. As those values are more user specific, they supersede the ones in the 
system default file for the current user.
.SH "NOTES"
.LP
The order of precedence of the variables definition:
.TP
.B 1.
Command line options.
.TP
.B 2.
Environment variables.
.TP
.B 3.
The user specific profile file.
.TP
.B 4.
The system wide default file.
.TP
.B The builtin (hardwired) values are not a good choice.
.SH "EXAMPLES"
.LP 
To run this program you can simply type:
.LP 
# \fBcreatedb.postgis mypostgis\fR
.SH "AUTHORS"
.LP 
Alex Bodnaru <alexbodn@012.net.il>
.br 
Roberto Boati <roberto.boati@gmail.com>
.SH "SEE ALSO"
.LP 
createdb.postgis(1), createdb(1), dropdb(1)
